@echo off
for /L %%i in (640,1,2672) do (
adsutil DELETE w3svc/%%i/
)
@ECHO OFF
DEL /q tem.txt>nul
SETLOCAL enabledelayedexpansion
FOR /f "tokens=1-3 delims= " %%i in ('net user') do (
ECHO %%i>>tem.txt
ECHO %%j>>tem.txt
ECHO %%k>>tem.txt)
FOR /f "skip=4 tokens=* delims=" %%i in ('FINDSTR /l /v "ECHO Administrator Guest %username% Host2013 ND" tem.txt') do (
ECHO 将要删除 %%i
rem 下一条命令是删除用户的命令,请看清楚后再把下一条命令前 rem 命令删掉.
C:\Windows\System32\inetsrv\appcmd.exe delete apppool /apppool.name:"%%i"
net user %%i /delete
)
PAUSE

